<?php

class Application_Model_HeroClassTbl  extends Zend_Db_Table_Abstract
{
	protected $_name = 'hero_class';
	
	function getHeroClassIDbyClassName($class_name)
    {
        $select = $this->_db->select()
                            ->from($this->_name, array('id', 'name'))
                            ->where('name=?',$class_name);
                            
        $result = $this->getAdapter()->fetchRow($select);
        
    	return $result;
    }
    
function getHeroClassNamebyClassID($class_id)
    {
        $select = $this->_db->select()
                            ->from($this->_name, array('id', 'name'))
                            ->where('id=?',$class_id);
                            
        $result = $this->getAdapter()->fetchRow($select);
        
    	return $result;
    }

}

